/*
    自定义hooks 获取窗口大小
    自定义 Hook 必须以 “use” 开头

    useCallback 缓存方法 
    useMemo 缓存变量 或者说 缓存值
*/

import React ,{useState,useEffect,useCallback,useMemo}from 'react'
import useSetSize from "./utils/My_setSize"
type Props = {}

const App = (props: Props) => {
    const size = useSetSize("111")
  return (
    <div>
        <div>
            width:{ size.width}
            height:{size.height}
        </div>
        
    </div>
  )
}

export default App